import request from "../utils/request"
//加入购物车
export const reqAddCart = (skuId, skuNum) => {
  return request({
    method: "POST",
    url: `/cart/addToCart/${skuId}/${skuNum}`,
  })
}
//获取购物车
export const reqGetCartList = () => {
  return request({
    method: "GET",
    url: `/cart/cartList`,
  })
}
//修改选中状态
export const reqUpdateCartIsChecked = (skuId, isChecked) => {
  return request({
    method: "GET",
    url: `/cart/checkCart/${skuId}/${isChecked}`,
  })
}
//删除商品
export const reqDelCart = (skuId) => {
  return request({
    method: "DELETE",
    url: `/cart/deleteCart/${skuId}`,
  })
}
